/*    */ package com.zimbra.cs.service.admin;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.AdminConstants;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.cs.account.Account;
/*    */ import com.zimbra.cs.account.accesscontrol.AdminRight;
/*    */ import com.zimbra.cs.account.accesscontrol.Right;
/*    */ import com.zimbra.cs.account.accesscontrol.RightCommand;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class GetAllRights
/*    */   extends RightDocumentHandler
/*    */ {
/*    */   public Element handle(Element request, Map<String, Object> context)
/*    */     throws ServiceException
/*    */   {
/* 37 */     ZimbraSoapContext zsc = getZimbraSoapContext(context);
/* 38 */     Account account = getRequestedAccount(zsc);
/*    */     
/* 40 */     String targetType = request.getAttribute("targetType", null);
/* 41 */     boolean expandAllAtrts = request.getAttributeBool("expandAllAttrs", false);
/* 42 */     String rightClass = request.getAttribute("rightClass", null);
/*    */     
/* 44 */     List<Right> rights = RightCommand.getAllRights(targetType, rightClass);
/*    */     
/* 46 */     Element response = zsc.createElement(AdminConstants.GET_ALL_RIGHTS_RESPONSE);
/* 47 */     for (Right right : rights) {
/* 48 */       RightCommand.rightToXML(response, right, expandAllAtrts, account.getLocale());
/*    */     }
/* 50 */     return response;
/*    */   }
/*    */   
/*    */   public void docRights(List<AdminRight> relatedRights, List<String> notes)
/*    */   {
/* 55 */     notes.add("Do not need any right, all admins are allowed.");
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/admin/GetAllRights.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */